﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace OpenAdmin.Application.Services.Dtos
{
    /// <summary>
    /// 权限菜单响应类
    /// </summary>
    public class PermissionMenuResponseDto
    {
        /// <summary>
        /// id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 父级Id
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 是否菜单
        /// </summary>
        public bool IsMenuItem { get; set; }

        /// <summary>
        /// 元数据
        /// </summary>
        public PermissionMenuMeta Meta { get; set; }

        /// <summary>
        /// 子级
        /// </summary>
        public List<PermissionMenuResponseDto> Children { get; set; } = new List<PermissionMenuResponseDto>();

        /// <summary>
        /// 
        /// </summary>
        [JsonIgnore]
        public string Icon { get; set; }
    }
    /// <summary>
    /// 权限菜单元数据
    /// </summary>
    public class PermissionMenuMeta
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
    }
}
